package com.okami.domain.customer;


import com.okami.common.AbstractEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.Value;
import lombok.experimental.Accessors;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @author: TanJingyu
 * @create: 2020-12-19 11:38
 **/
@EqualsAndHashCode(callSuper = true, exclude = "user")
@Entity
@Table
@Accessors(chain = true)
@Data
@ToString(exclude = "user")
public class BankCard extends AbstractEntity<Long> {
    private String code;

    @ManyToOne(targetEntity = User.class)
    @JoinColumn(name = "user_id")
    private User user;
}
